themes: Restore default progressbar min sizes
authorDaniel Boles <dboles.src@gmail.com>
Tue, 3 Jul 2018 17:55:31 +0000 (18:55 +0100)
committerDaniel Boles <dboles.src@gmail.com>
Tue, 3 Jul 2018 17:55:31 +0000 (18:55 +0100)
The min size on the oriented axis used to come from style props with
default values in the source file, used if the theme did not provide a
min size in CSS. When the style props were removed, so was any notion of
a minimal size for proressbars' main axis, meaning that now progressbars
without expand or any other source of min size were just tiny specks.

The right place to do that was always the theme, so in our themes now,
fix that by copying the old default values for the style properties; see:

https://gitlab.gnome.org/GNOME/gtk/issues/1191#note_259393
https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/gtk/gtkprogressbar.c#L92

The result should be the same in that (A) the min size is now what it is
in GTK+ 3 & (B) an app/user can override the theme exactly the same way.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1192

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css
gtk/theme/HighContrast/_common.scss
gtk/theme/HighContrast/gtk-contained-inverse.css
gtk/theme/HighContrast/gtk-contained.css

index beac635fcb72f2748accf8c554a7919d6bd6c98a..f9c6cec55b524de2963c4c945dd2a2751055b15b 100644 (file)
@@ -3320,11 +3320,15 @@ scale {
 progressbar {
   // sizing
   &.horizontal {
+    trough { min-width: 150px; }
+
     trough,
     progress { min-height: 2px; }
   }
 
   &.vertical {
+    trough { min-height: 80px; }
+
     trough,
     progress { min-width: 2px; }
   }
index b3cb7ea8be0139df27f43164f6088e7d2d16376b..281d317c0c09bddf8da4768622aec3ff7eb475a6 100644 (file)
@@ -1444,8 +1444,12 @@ scale.color.fine-tune.vertical:dir(rtl) slider { margin-right: -15px; margin-lef
 /***************** Progress bars * */
 progressbar { font-size: smaller; color: rgba(238, 238, 236, 0.4); }
 
+progressbar.horizontal trough { min-width: 150px; }
+
 progressbar.horizontal trough, progressbar.horizontal progress { min-height: 2px; }
 
+progressbar.vertical trough { min-height: 80px; }
+
 progressbar.vertical trough, progressbar.vertical progress { min-width: 2px; }
 
 progressbar.horizontal progress { margin: 0 -1px; }
index f8ce8af8fbc9f7fe262fd553106e3aa32cbcb101..f562db8947a7efff45fbc102db2665ad7cdbff98 100644 (file)
@@ -1464,8 +1464,12 @@ scale.color.fine-tune.vertical:dir(rtl) slider { margin-right: -15px; margin-lef
 /***************** Progress bars * */
 progressbar { font-size: smaller; color: rgba(46, 52, 54, 0.4); }
 
+progressbar.horizontal trough { min-width: 150px; }
+
 progressbar.horizontal trough, progressbar.horizontal progress { min-height: 2px; }
 
+progressbar.vertical trough { min-height: 80px; }
+
 progressbar.vertical trough, progressbar.vertical progress { min-width: 2px; }
 
 progressbar.horizontal progress { margin: 0 -1px; }
index 4150fd82a0ee94fa8dc3125b28760dfbbd19b1db..dba4775e5d895ea615574b1633074f52902d9f7e 100644 (file)
@@ -2499,11 +2499,15 @@ progressbar {
 
   // moving bit
   &.horizontal {
+    trough { min-width: 150px; }
     trough, progress { min-height: 2px; }
   }
+
   &.vertical {
+    trough { min-height: 80px; }
     trough, progress { min-width: 2px; }
   }
+
   & progress {
     border-width: 1px;
     border-style: solid;
index 1ac9d8db135bc903022c8a2dfebcdabf391570f2..8d5e0ee4350330654c265c6f1d40e538517f5d4e 100644 (file)
@@ -1105,8 +1105,12 @@ progressbar trough:backdrop { border-color: #737373; background-color: #282828;
 
 progressbar.osd trough { background-color: transparent; box-shadow: none; border-width: 0; }
 
+progressbar.horizontal trough { min-width: 150px; }
+
 progressbar.horizontal trough, progressbar.horizontal progress { min-height: 2px; }
 
+progressbar.vertical trough { min-height: 80px; }
+
 progressbar.vertical trough, progressbar.vertical progress { min-width: 2px; }
 
 progressbar progress { border-width: 1px; border-style: solid; border-radius: 3px; border-color: #aaa; background-color: #ddd; box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2); }
index 1e6e2e6b4022ea9054989ca4d8ec535c0395da38..498c11487d302e5250dee4ab05a405b6ee4958b6 100644 (file)
@@ -1111,8 +1111,12 @@ progressbar trough:backdrop { border-color: #8d8d8d; background-color: #d7d7d7;
 
 progressbar.osd trough { background-color: transparent; box-shadow: none; border-width: 0; }
 
+progressbar.horizontal trough { min-width: 150px; }
+
 progressbar.horizontal trough, progressbar.horizontal progress { min-height: 2px; }
 
+progressbar.vertical trough { min-height: 80px; }
+
 progressbar.vertical trough, progressbar.vertical progress { min-width: 2px; }
 
 progressbar progress { border-width: 1px; border-style: solid; border-radius: 3px; border-color: #000; background-color: #000; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); }